package com.jlkf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jlkf.pojo.TblApp;
import com.jlkf.pojo.TblCompanyInfo;
import com.jlkf.pojo.TblHelp;
import com.jlkf.service.HelpService;
import com.jlkf.service.SystemSetService;
import com.platform.server.response.response.pojo.ReturnData;

/**
 * 公司信息
 * @author DuoNuo
 *
 */
@Controller
@RequestMapping("system")
public class SystemController {
	@Autowired
	private SystemSetService systemSetService;
	@Autowired
	private HelpService helpService;
	
	/**
	 * 关于我们、客服电话
	 */
	@RequestMapping("getCompanyInfo")
	@ResponseBody
	public ReturnData getCompanyInfo(){
		TblCompanyInfo info = systemSetService.getInfo();
		return new ReturnData(info,200,"公司信息");
	}
	
	/**
	 * 帮助中心
	 */
	@RequestMapping("getHelp")
	@ResponseBody
	public ReturnData getHelp(){
		TblHelp info = helpService.getDetail();
		return new ReturnData(info,200,"帮助中心");
	}
	
	/**
	 * 版本更新
	 */
	@RequestMapping("getApp")
	@ResponseBody
	public ReturnData getApp(){
		TblApp app = systemSetService.getAppInfo();
		return new ReturnData(app,200,"版本更新");
	}
}
